package com.yuke.cloud.service.pmc.controller.frontend;

import com.yuke.cloud.common.core.support.BaseController;
import com.yuke.cloud.common.util.wrapper.WrapMapper;
import com.yuke.cloud.common.util.wrapper.Wrapper;
import com.yuke.cloud.service.pmc.dto.RegionResortIntroducePictureDto;
import com.yuke.cloud.service.pmc.service.ProdRegionResortIntroduceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* Created by zys on 2018/09/30.
*/
@Slf4j
@Api(value = "WEB - ProdRegionResortIntroduceController", tags = "处理ProdRegionResortIntroduce相关请求", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RestController
@RequestMapping("/mall/prod/region_resort_introduce")
public class MallProdRegionResortIntroduceController extends BaseController {
    @Resource
    private ProdRegionResortIntroduceService prodRegionResortIntroduceService;

    @GetMapping("/app/recommend")
    @ApiOperation(httpMethod = "GET", value = "分页获取所有记录")
    public Wrapper<List<RegionResortIntroducePictureDto>> listByRecommend() {
        List<RegionResortIntroducePictureDto> list = prodRegionResortIntroduceService.findByRecommend();
        return WrapMapper.ok(list);
    }
}
